<%
main_enabled = true unless local_assigns.has_key?(:main_enabled)
main_tag = main_enabled ? :main : :div
columns ||= 6
# Class names need to be complete, not metaprogrammed, because of Tailwind class purge
css_class = case columns
            when 10 then "cols-10"
            when 8 then "cols-8"
            else "cols-6"
            end
%>

<%= content_tag main_tag, class: "layout-1col #{css_class}" do %>
  <%= yield %>
<% end %>
